package com.ruoyi.siyun.service.impl;


import com.ruoyi.siyun.domain.SyCarousel;
import com.ruoyi.siyun.mapper.SyCarouselMapper;
import com.ruoyi.siyun.service.ISyCarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;



/**
 * 轮播图Service业务层处理
 * 
 * @author majinyi
 * @date 2024-12-19
 */
@Service
public class SyCarouselServiceImpl implements ISyCarouselService
{
    @Autowired
    private SyCarouselMapper syCarouselMapper;

    /**
     * 查询轮播图
     * 
     * @param carouselId 轮播图主键
     * @return 轮播图
     */
    @Override
    public SyCarousel selectSyCarouselByCarouselId(Long carouselId)
    {
        return syCarouselMapper.selectSyCarouselByCarouselId(carouselId);
    }

    /**
     * 查询轮播图列表
     * 
     * @param syCarousel 轮播图
     * @return 轮播图
     */
    @Override
    public List<SyCarousel> selectSyCarouselList(SyCarousel syCarousel)
    {
        return syCarouselMapper.selectSyCarouselList(syCarousel);
    }

    /**
     * 新增轮播图
     * 
     * @param syCarousel 轮播图
     * @return 结果
     */
    @Override
    public int insertSyCarousel(SyCarousel syCarousel)
    {
        return syCarouselMapper.insertSyCarousel(syCarousel);
    }

    /**
     * 修改轮播图
     * 
     * @param syCarousel 轮播图
     * @return 结果
     */
    @Override
    public int updateSyCarousel(SyCarousel syCarousel)
    {
        return syCarouselMapper.updateSyCarousel(syCarousel);
    }

    /**
     * 批量删除轮播图
     * 
     * @param carouselIds 需要删除的轮播图主键
     * @return 结果
     */
    @Override
    public int deleteSyCarouselByCarouselIds(Long[] carouselIds)
    {
        return syCarouselMapper.deleteSyCarouselByCarouselIds(carouselIds);
    }

    /**
     * 删除轮播图信息
     * 
     * @param carouselId 轮播图主键
     * @return 结果
     */
    @Override
    public int deleteSyCarouselByCarouselId(Long carouselId)
    {
        return syCarouselMapper.deleteSyCarouselByCarouselId(carouselId);
    }
}
